POV-Ray : Newsgroups : povray.advanced-users : Help needed! Forest memory problems : Re: Help needed! Forest memory problems - I give up! Server Time
29 Jul 2024 10:27:48 EDT (-0400)
  Re: Help needed! Forest memory problems - I give up!  
From: Christoph Hormann
Date: 20 Dec 2002 03:30:56
Message: <3E02D541.9ED0828F@gmx.de>
Tek wrote:
> 
> Well I no longer have the code that didn't work, plus I'm not sure how Gilles
> would feel about me distributing my modified version of his code. But you might
> want to try this:
> 
> If you have maketree you can probably recreate my problem using the second
> example tree (extree2.pov), provided you don't use the branches ('cause they're
> not meshes).
> 
> Set it to output files (dofile = true), then run it so it produces 3 files.
> 
> Create a new scene that declares an object as:
> #declare tree = #include "gtfoliage2.inc"
> 
> And then try placing 8000 instances of that object in a loop. In theory you
> should experience the same difficulties I do, though if not I'd be interested to
> know because it would indicate some other problem in my scene.

If you do that with an unmodified maketree you get one mesh for every leaf
and 'tree' is a union of several thousand meshes.  Using that several
times will require at least the memory for the transformation matrices for
each mesh so you won't save much.  The trick is to put all leaves in *one*
mesh.  This involves some modification of the code, you have to transform
the vertices of the leaf instead of the leaf itself.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 07 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.